<? if(!empty($products)) { ?>

    <form action="" method="post">

    <div class="content_block" style="width:100%">

        <h3>Edit Supplier Products:</h3>
        <div class="hr"></div>     
        <div class="live_search_msg"></div>                     

        <? 
        $i=0;
        foreach($products as $prod){ 
        ?>  
            <div class="product_block search">
                <img src="<?=Thumbnail(base_url().UPLOADS_FOLDER.PRODUCT_IMG_FOLDER.$prod['Main_Image'])?>" />
                <span class="title"><?=$prod['Name_Products']?></span>

                <span style="display:block; float:left; width:35px; margin-right:5px; font-weight:bold; font-variant:small-caps">code</span>
                <input type="text" name="products[<?=$i?>][code]" value="<?=$prod['Code_Products']?>" style="width:116px" />
                                                                                                    
                <span style="display:block; float:left; width:35px; margin-right:5px; font-weight:bold; font-variant:small-caps">price</span>
                <input type="text" name="products[<?=$i?>][price]" value="<?=$prod['Price_Products']?>" style="width:57px; display:inline" />
                <select name="products[<?=$i?>][currency]" style="width:55px">
                <? 
                foreach(explode(",",CURRENCY_LIST) as $cur){ 
                ?>     
                    <option value="<?=$cur?>" <?=set_select('currency', $cur, ($prod['Currency_Products']==$cur))?>><?=$cur?></option>

                <? } ?>
                </select> 

                <input type="hidden" name="products[<?=$i?>][product_id]" value="<?=$prod['id_Products']?>" />
                <input type="hidden" name="products[<?=$i?>][supplier_id]" value="<?=$supplier?>" />

            </div>
        <? 
            $i++;
        } 
        ?>

    </div>

    <div class="content_block">   
        <a href="<?=current_url()?>" class="button">CANCEL</a>
        <input type="submit" class="button" name="suppliers_module_submit_action" href="#" value="UPDATE PRODUCTS" />
    </div>


    </form>                                                                                

<? } ?>